<script setup>

import Son from "./Son.vue";
import {reactive, ref} from "vue";

// 父传子 只读
// const money = ref(100);
// const books = ref(["西游记","红楼梦"]);

const data = reactive({
      money: 100,
      books: ["西游记","红楼梦"]
    })
</script>

<template>

  <div>
    <h2 style="background-color: #646cff">Father</h2>
    <button @click="data.money+=10">充值</button>
<!--    <Son :money='data.money' :books='data.books'/>-->
    <Son v-bind="data"/>
  </div>
</template>

<style scoped>

</style>